<template>
    <div>
        <table class="table">
            <tr>
                <td>房型名称</td>
                <td> <input type="text" v-model="info.houseName" disabled></td>
            </tr>
             <tr>
                <td>房型价格</td>
                <td> <input type="text" v-model="info.price" disabled></td>
            </tr>
            <tr>
                <td>房型大小</td>
                <td> <input type="text" v-model="info.number" disabled></td>
            </tr>
            <tr>
                <td>房型预览图</td>
                <td> 
                   <img :src="info.img" width="60" height="60" alt="" v-if="info.img!=''">
                </td>
            </tr>
            <tr>
                <td>所在地址</td>
                <td> <input type="text" v-model="info.address" disabled></td>
            </tr>
             <tr>
                <td>房间号</td>
                <td><input type="text" v-model="info.typeId" disabled></td>
            </tr>
            <br>
            <tr>
                <td></td>
                <td> <a href="/goshow">返回</a></td>
            </tr>
        </table>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios'
import {ref,reactive,onMounted} from 'vue'
import { useRoute,useRouter } from 'vue-router';
const router = useRouter();
const route = useRoute();
const info:any=ref([]);
onMounted(()=>{
    Find()
})
const Find=()=>{
    axios.get('https://localhost:7267/api/Boss/GetHouseType',{params:{id:route.query.id}}).then(res=>{
        Object.assign(info.value,res.data);
    })
}
</script>

<style scoped>

</style>